mixin audi-footer(params)
  -var {flame, back, theme = 'white'} = params || {}

  -console.log(audiUrls, theme)
  -var iconUrl = audiUrls[theme].url
  -var bgUrl = back ? images[back].url : audiUrls['footer'].url
  -var appCodeUrl = audiUrls.appCode.url
  -var wxchannelCodeUrl = audiUrls.wxchannelCode.url
  -var footerWidth = back ? images[back].width : audiUrls['footer'].width
  -var footerHeight = back ? images[back].height : audiUrls['footer'].height


  section(style=`vertical-align:top;margin-top:0;margin-bottom:0!important`)
    section(style=`vertical-align:top;margin-top:-1px;margin-bottom:0!important`)
      section(style=`height:0;vertical-align:top;opacity:0`)
        br

      //- icon tops canvas
      if flame || flame === 0
        -var flameUrl = images[flame].url
        -var flameWidth = images[flame].width
        -var flameHeight = images[flame].height
        section(style=`vertical-align:top;margin-top:0`)
          section(style=`height:0;pointer-events:painted`)
            //- 公众号跳转
            section
              mp-common-profile(data-pluginname=`mpprofile`, data-weui-theme=`light`, 
              data-id=`MzkzMzM4NDMwNw==`, 
              data-headimg=`http://mmbiz.qpic.cn/mmbiz_png/0nHkpTgvFXNJMNbYevUyt5h6NynEicmtyqIdTHdD6QmTRXtxYiamQNC7oDXgia7bbNV5K5EQVZPCdPTQd2sDntRBQ/300?wx_fmt=png&wxfrom=19`, 
              data-nickname=`奥迪`, data-alias=`audi_0000`, 
              data-signature=`突破，进抵新境`, data-from=`0`, 
              data-is_biz_ban=`0`, data-origin_num=`20`, data-isban=`0`, 
              data-biz_account_status=`0`, 
              data-index=`0`)
          section(style=`transform:scale(1);pointer-events:none`)
            svg(viewBox=`0 0 ${flameWidth} ${flameHeight}`, style=`pointer-events:none;display:inline-block;width:100%;
            vertical-align:top;background-position:0 0;background-repeat:no-repeat;background-size:100% 100%;
            background-attachment:scroll;-webkit-tap-highlight-color:transparent;user-select:none;
          background-image:url(${flameUrl})`)

      section(style=`vertical-align:top;margin-top:-1px;line-height:0;font-size:0`)
        section(style=`height:0`)
          section(style=`pointer-events:none;transform:scale(1)`)
            svg(style=`pointer-events:none;transform:scale(1);display:inline-block;width:100%;vertical-align:top`, viewBox=`0 0 900 324`)
          section(style=`height:0`)
            section(style=`display:inline-block;vertical-align:top;width:12.3%`)
              section(style=`text-align:center;margin-top:0;margin-bottom:0`)
                section
            section(style=`display:inline-block;vertical-align:top;width:17.5%`)
              section(style=`text-align:center;margin-top:0;margin-bottom:0`)
                section(style=`vertical-align:middle;display:inline-block;line-height:0`)
                  p(style=`height:0!important;display:block`)
                    img(style=`border-width:0;border-style:initial;border-color:initial;opacity:1;user-select:none;-webkit-user-drag:none;visibility:visible!important;width:118px!important;height:149.367px!important`, data-ratio=`1.2658227848101267`, data-w=`158`, data-original-style=`border-width: 0px;border-style: initial;border-color: initial;opacity: 1;user-select: none;-webkit-user-drag: none;height: auto !important;width: auto !important;visibility: visible !important;`, data-index=`1`, src=`${appCodeUrl}`, _width=`auto`, crossorigin=`anonymous`, alt=`图片`)
            section(style=`display:inline-block;vertical-align:top;width:38.8%`)
              section(style=`text-align:center;margin-top:0;margin-bottom:0`)
                section
            section(style=`display:inline-block;vertical-align:top;width:17.5%`)
              section(style=`text-align:center;margin-top:0;margin-bottom:0`)
                section(style=`vertical-align:middle;display:inline-block;line-height:0`)
                  p(style=`height:0!important;display:block`)
                    img(style=`border-width:0;border-style:initial;border-color:initial;opacity:1;user-select:none;-webkit-user-drag:none;visibility:visible!important;width:118px!important;height:149.367px!important`, data-ratio=`1.2658227848101267`, data-w=`158`, data-original-style=`border-width: 0px;border-style: initial;border-color: initial;opacity: 1;user-select: none;-webkit-user-drag: none;height: auto !important;width: auto !important;visibility: visible !important;`, data-index=`2`, src=`${wxchannelCodeUrl}`, _width=`auto`, crossorigin=`anonymous`, alt=`图片`)
            section(style=`display:inline-block;vertical-align:top;width:13.1%`)
              section(style=`text-align:center;margin-top:0;margin-bottom:0`)
                section
        section(style=`transform:scale(1);pointer-events:none`)
          svg(style=`pointer-events:none;display:inline-block;width:100%;vertical-align:top;background-position:0 0;background-repeat:no-repeat;background-size:100% 100%;background-attachment:scroll;background-image:url("${bgUrl}");-webkit-tap-highlight-color:transparent;user-select:none`, viewBox=`0 0 900 640`)
            g
              foreignObject(x=`0`, y=`0`, width=`${footerWidth}`, height=`${footerHeight}`)
                svg(style=`display:inline-block;width:100%;vertical-align:top;background-position:0 0;background-repeat:no-repeat;background-size:100%;background-attachment:scroll;background-image:url("${iconUrl}");-webkit-tap-highlight-color:transparent;user-select:none`, viewBox=`0 0 900 640`)
            g(opacity=`0`)
              a(data-miniprogram-appid=`wx9074de28009e1111`, data-miniprogram-path=`pages/profile/profile?objectUid=1841218153&amp;nickname=%E5%A5%A5%E8%BF%AA`)
                rect(x=`130px`, y=`110px`, width=`136px`, height=`176px`, style=`pointer-events:painted;opacity:0`)
            g(opacity=`0`)
              a(data-miniprogram-appid=`wx7564fd5313d24844`, data-miniprogram-path=`pages/video/video?share_times=2&page=0&avid=471474611`)
                rect(x=`387px`, y=`110px`, width=`136px`, height=`176px`, style=`pointer-events:painted;opacity:0`)
            g(opacity=`0`)
              a(style=`font-size:17px`, data-miniprogram-appid=`wxb296433268a1c654`, data-miniprogram-path=`pages/secondary/author/index?from=share&author_id=5a1933fddb2e60610ccd3e70`, data-miniprogram-nickname=`小红书`, data-miniprogram-type=`text`)
                rect(x=`387px`, y=`347px`, width=`136px`, height=`176px`, style=`pointer-events:painted;opacity:0`)
